#include<stdio.h>
void FindMax(int p[][3], int m, int n, int *pRow, int *pCol)
{
	int max = p[0][0];
	*pRow = 0;
	*pCol = 0;
	int i = 0,j = 0;
	for(i = 0;i<m;i++)
	{
		for(j = 0;j<n;j++)
		{
			if(p[i][j]>max) {
				max = p[i][j];
				*pRow = i;
				*pCol = j;
			}
		}
	}
}
int main()
{
	int arr[2][3];
	int MaxRow,MaxCol;
	int i = 0,j = 0;
	for(i = 0;i<2;i++)
	{
		for(j = 0;j<3;j++)
		{
			scanf("%d",&arr[i][j]);
		}
	}
	FindMax(arr,2,3,&MaxRow,&MaxCol);
	printf("%d %d %d\n",arr[MaxRow][MaxCol],MaxRow,MaxCol);
	return 0;
}
